package com.ruoyi.mes.service.impl;

import java.util.List;

import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.core.utils.SecurityUtils;
import com.ruoyi.mes.domain.MesTaskDetails;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mes.mapper.MesTaskDetailsMapper;
import com.ruoyi.mes.service.IMesTaskDetailsService;

import javax.annotation.Resource;

/**
 * 生产任务-明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-10-27
 */
@Service
public class MesTaskDetailsServiceImpl implements IMesTaskDetailsService 
{
    @Resource
    private MesTaskDetailsMapper mesTaskDetailsMapper;

    /**
     * 查询生产任务-明细
     * 
     * @param taskDetailUuid 生产任务-明细主键
     * @return 生产任务-明细
     */
    @Override
    public MesTaskDetails selectMesTaskDetailsByTaskDetailUuid(String taskDetailUuid)
    {
        return mesTaskDetailsMapper.selectMesTaskDetailsByTaskDetailUuid(taskDetailUuid);
    }

    /**
     * 查询生产任务-明细列表
     * 
     * @param mesTaskDetails 生产任务-明细
     * @return 生产任务-明细
     */
    @Override
    public List<MesTaskDetails> selectMesTaskDetailsList(MesTaskDetails mesTaskDetails)
    {
        return mesTaskDetailsMapper.selectMesTaskDetailsList(mesTaskDetails);
    }
    @Override
    public List<MesTaskDetails> selectMesTaskDetailsListByTaskUuid(MesTaskDetails mesTaskDetails)
    {
        return mesTaskDetailsMapper.selectMesTaskDetailsListByTaskUuid(mesTaskDetails);
    }

    /**
     * 新增生产任务-明细
     * 
     * @param mesTaskDetails 生产任务-明细
     * @return 结果
     */
    @Override
    public int insertMesTaskDetails(MesTaskDetails mesTaskDetails)
    {
        return mesTaskDetailsMapper.insertMesTaskDetails(mesTaskDetails);
    }

    /**
     * 修改生产任务-明细
     * 
     * @param mesTaskDetails 生产任务-明细
     * @return 结果
     */
    @Override
    public int updateMesTaskDetails(MesTaskDetails mesTaskDetails)
    {
        return mesTaskDetailsMapper.updateMesTaskDetails(mesTaskDetails);
    }

    /**
     * 批量删除生产任务-明细
     * 
     * @param taskDetailUuids 需要删除的生产任务-明细主键
     * @return 结果
     */
    @Override
    public int deleteMesTaskDetailsByTaskDetailUuids(String[] taskDetailUuids)
    {
        return mesTaskDetailsMapper.deleteMesTaskDetailsByTaskDetailUuids(taskDetailUuids);
    }

    /**
     * 删除生产任务-明细信息
     * 
     * @param taskDetailUuid 生产任务-明细主键
     * @return 结果
     */
    @Override
    public int deleteMesTaskDetailsByTaskDetailUuid(String taskDetailUuid)
    {
        return mesTaskDetailsMapper.deleteMesTaskDetailsByTaskDetailUuid(taskDetailUuid);
    }



    /**
     * 生成生产任务 - 明细
     */
    public int genTaskDetails(String processUuid){

        return mesTaskDetailsMapper.genTaskDetails(processUuid);
    };
    
    
}
